//
//  XRCollectionVideoTableCell.m
//  XClassRoom
//
//  Created by NeiQuan on 16/11/10.
//  Copyright © 2016年 Mr-yuwei. All rights reserved.
//

#import "XRCollectionVideoTableCell.h"

@implementation XRCollectionVideoTableCell

-(void)addOwnView{
    
    _leftImageView=[[UIImageView alloc] init];
    _leftImageView.contentMode=UIViewContentModeScaleAspectFill;
    _leftImageView.clipsToBounds=YES;
    [_leftImageView sd_setImageWithURL:[NSURL URLWithString:@"http://upload-images.jianshu.io/upload_images/2741392-05c026a0c4fff732.jpg?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240"] placeholderImage:defaultPImage options:SDWebImageTransformAnimatedImage];
    [self.contentView addSubview:_leftImageView];
    [_leftImageView mas_makeConstraints:^(MASConstraintMaker *make)
    {    make.left.top.equalTo(self.contentView).with.offset(10);
        make.bottom.equalTo(self.contentView).with.offset(-10);
        make.width.equalTo(_leftImageView.mas_height);
    }];
    
    
    _titleLable=[[UILabel alloc] init];
    _titleLable.font=[UIFont systemFontOfSize:13];
    _titleLable.numberOfLines=0;
    _titleLable.textColor=kBlackColor;
    _titleLable.text=@"男士服装,欢迎来抢购欢迎来抢购欢迎来抢购欢迎来抢购欢迎来抢购";
    [self.contentView addSubview:_titleLable];
    [_titleLable mas_makeConstraints:^(MASConstraintMaker *make)
     {   make.right.equalTo(self.contentView).with.offset(-10);
         make.left.equalTo(_leftImageView.mas_right).offset(10);
         make.top.equalTo(_leftImageView.mas_top);
    }];
    
    _priceLable=[[UILabel alloc] init];
    _priceLable.text=@"$300";
    _priceLable.textColor=kNavBarThemeColor;
    _priceLable.font=[UIFont systemFontOfSize:11];
    [self.contentView addSubview:_priceLable];
    
    [_priceLable mas_makeConstraints:^(MASConstraintMaker *make)
    {   make.left.equalTo(_leftImageView.mas_right).offset(10);
        make.top.equalTo(_titleLable.mas_bottom).offset(10);
    }];
    
    _leaveLable=[[UILabel alloc] init];
    _leaveLable.text=@"好评率100%";
    _leaveLable.textColor=kGrayColor;
    _leaveLable.font=[UIFont systemFontOfSize:11];
    [self.contentView addSubview:_leaveLable];
    [_leaveLable mas_makeConstraints:^(MASConstraintMaker *make)
     {   make.left.equalTo(_priceLable.mas_right).offset(10);
         make.top.equalTo(_titleLable.mas_bottom).offset(10);
     }];
    _comLable=[[UILabel alloc] init];
    _comLable.text=@"20人评价";
    _comLable.textColor=kGrayColor;
    _comLable.font=[UIFont systemFontOfSize:11];
    [self.contentView addSubview:_comLable];
    [_comLable mas_makeConstraints:^(MASConstraintMaker *make)
     {   make.left.equalTo(_leaveLable.mas_right).offset(10);
         make.top.equalTo(_titleLable.mas_bottom).offset(10);
     }];

}
@end
